<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBoosenPostsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('boosen_posts', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('cate_id')->default(0);
            $table->string('title');
            $table->string('slug');
            $table->string('cover')->nullable();
            $table->integer('author_id')->nullable();
            $table->text('content')->nullable();
            $table->tinyInteger('released')->default(0);
            $table->string('keywords')->nullable();
            $table->text('short_description')->nullable();
            $table->tinyInteger('hot')->default(0);
            $table->tinyInteger('recommend')->default(0);
            $table->dateTime('released_at')->nullable();
            $table->text('extra')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('boosen_posts');
    }
}
